package com.itheima.supermarket.manage.servicer;

import com.itheima.supermarket.manage.dao.ManagerDao;
import com.itheima.supermarket.manage.domain.Managers;

import java.io.IOException;
import java.util.ArrayList;

public class ManagerServicer {

    private ManagerDao md = new ManagerDao();

    //获取Managers账号密码集合
    public ArrayList<Managers> getManagers() {
        ArrayList<Managers> managers = null;
        try {
            managers = md.getManagers();
        } catch (IOException e) {
            System.out.println("md.getManagers()出问题了！");;
        }
        return managers;
    }

    //添加注册管理员信息
    public void addRegister(String userName, String passWord) {
        try {
            md.addRegister(userName,passWord);
        } catch (IOException e) {
            System.out.println("md.addRegister(userName,passWord)出问题了！");
        }
    }
}
